from Dataset.Dataset import Dataset
title = "Semeion"
file_name = r"""..\Datasets\SemeionData.txt"""

a = Dataset(title, file_name)
assert a.title == title
assert a.file_path == file_name
assert a.instance_count == 1593
assert a.attribute_count == 266
assert a.label_count == 0

d1 = a.data[:]
a.label('a'*256 + 'l'*10)
a.write(r"""..\Datasets\d2.txt""")
assert a.title == title
assert a.file_path == file_name
assert a.instance_count == 1593
assert a.attribute_count == 256
assert a.label_count == 10

d2 = a.data[:]
a.unlabel()
assert a.title == title
assert a.file_path == file_name
assert a.instance_count == 1593
assert a.attribute_count == 266
assert a.label_count == 0

d3 = a.data[:]
assert not d1 == d2
assert d1 == d3
assert not d2 == d3